#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
#include <assert.h>
char* my_strncpy(char* dest, const char* src,size_t num)
{
	assert(dest && src);
	char* ret = dest;
	while (num--)
	{
		*dest++ = *src++;
	}
	return ret;
}

int main()
{
	char arr1[20] = "abcdef";
	char arr2[] = "****";
	printf("%s", my_strncpy(arr1, arr2, 3));
	return 0;
}
